import request from '@/config/axios'

export interface BackgroundBaseVO {
	id : number
	name : string
	url : string
	type : number
	status : number
}


// 创建背景图管理
export const createBackground = async (data) => {
	return await request.post({ url: '/blind/background/create', data })
}

// 更新背景图管理
export const updateBackground = async (data) => {
	return await request.put({
		url: '/blind/background/update', data
	})
}

// 删除背景图管理
export const deleteBackground = async (id : number) => {
	return await request.delete({
		url: '/blind/background/delete?id=' + id
	})
}

// 获得背景图管理
export const getBackground = async (id : number) => {
	return request.get({
		url: '/blind/background/get?id=' + id
	})
}


// 获得背景图管理分页
export const getBackgroundPage = async (params) => {
	return await request.get({
		url: '/blind/background/page', params
	})
}

// 导出背景图管理 Excel
export const exportBackgroundExcel = async (params) => {
	return await request.download({
		url: '/blind/background/export-excel', query
	})
}